package Demo_zhuanshu.XueQiang06;

import java.io.FileReader;
import java.io.IOException;
import java.util.Scanner;

public class Demo01 {
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入密码");
        String i = sc.next();
        if (i.equals("123456")){
            FileReader reader = new FileReader("G:\\学习\\txt.txt");
            int len = 0;
            while ((len=reader.read())!=-1){
                System.out.println((char) len);
            }
            reader.close();
        }
    }
}
